# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Steve Holmes <steve.holmes88@gmail.com>
# Contributor: Giulio Bai <giulio@hewle.com>

pkgname=accerciser
pkgver=3.40.0
pkgrel=2
pkgdesc="Interactive Python accessibility explorer for the GNOME desktop"
arch=(any)
url="https://wiki.gnome.org/Apps/Accerciser"
license=(BSD)
depends=(python gtk3 python-atspi ipython libwnck3 python-cairo python-xlib)
makedepends=(appstream-glib yelp-tools git)
groups=(gnome-extra)
_commit=3c7c127830cd8dc0bc69a8f88448d25674df1d80  # tags/3.40.0^0
source=("git+https://gitlab.gnome.org/GNOME/accerciser.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --disable-schemas-compile
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
}
